package identx

//var confuseRule = map[uint8]*scale.ConfuseRule{}
//var confuseMutex sync.RWMutex
//
//func confuseChar(index uint8, char uint8) uint8 {
//	confuseMutex.RLock()
//	rule, has := confuseRule[index]
//	confuseMutex.RUnlock()
//	if has == false {
//		rule = scale.NewConfuseRule(int64(index), scaleN)
//
//		confuseMutex.Lock()
//		confuseRule[index] = rule
//		confuseMutex.Unlock()
//	}
//	return rule.NormalToConfuse(char)
//}
//
//func normalChar(index uint8, char uint8) uint8 {
//	confuseMutex.RLock()
//	rule, has := confuseRule[index]
//	confuseMutex.RUnlock()
//	if has == false {
//		rule = scale.NewConfuseRule(int64(index), scaleN)
//		confuseMutex.Lock()
//		confuseRule[index] = rule
//		confuseMutex.Unlock()
//	}
//	return rule.ConfuseToNormal(char)
//}
